type BizObject = BIZAPI.ProDataYearEntity;

//药剂用量
const categoryList = [
  '植物除臭药剂',
  '次氯酸钠',
  '等效碳源',
  '复合型碳源',
  '葡萄糖',
  '聚氯化铝',
  '七水硫酸亚铁',
  '除磷剂',
  '碱',
  '片碱',
  '液碱',
  '稀硫酸',
  '盐酸',
  '阳离子聚丙烯酰胺(气浮)',
  '阳离子聚丙烯酰胺(脱泥)',
  '双氧水',
  '消泡剂',
  '柠檬酸',
  '膜清洗剂',
  '纳滤阻垢剂',
  '膜清洗剂(酸性)',
  '膜清洗剂(碱性)',
  '洛碛渗滤液非氧化杀菌剂',
  '三氯化铁液体'
];

//水费
const waterCategoryList = [
  '(水费)洛碛餐厨污水厂',
  '(水费)洛碛渗滤液污水厂',
  '(水费)黑石子渗滤液污水厂',
  '(水费)界石渗滤液污水厂',
  '(水费)走马渗滤液污水厂',
  '(水费)夏家坝渗滤液污水厂'
];

//电费
const electricityCategoryList = [
  '(电费)洛碛餐厨污水厂',
  '(电费)洛碛渗滤液污水厂',
  '(电费)黑石子渗滤液污水厂',
  '(电费)界石渗滤液污水厂',
  '(电费)走马渗滤液污水厂',
  '(电费)夏家坝渗滤液污水厂',
  '(电费)洛碛原水厂'
];

//其他生产费用
const otherProductionCosts = ['委外污泥运输处置费', '污泥热水解处置费', '污泥填埋费', '取水费'];

export const tableSource = (type: string): BizObject[] => {
  let customsList = [];
  if (type === '2') {
    customsList = waterCategoryList;
  } else if (type === '3') {
    customsList = electricityCategoryList;
  } else if (type === '4') {
    customsList = otherProductionCosts;
  } else {
    customsList = categoryList;
  }

  const data: BizObject[] = customsList.map((item) => {
    return {
      category: item,
      year: undefined,
      ton: 0,
      amount: 0,
      agentConsumption: 0,
      amountConsumption: 0
    } as BizObject;
  });
  return data;
};

export const tabItems = [
  {
    key: '1',
    label: '药剂用量',
    children: ''
  },
  {
    key: '2',
    label: '水费',
    children: ''
  },
  {
    key: '3',
    label: '电费',
    children: ''
  },
  {
    key: '4',
    label: '其他生产费用',
    children: ''
  }
];
